package com.tangula.web.kashine.repository;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import com.tangula.web.kashine.entity.ProductEntity;
import com.tangula.web.kashine.entity.StoreEntity;
@Repository
public interface StoreRepository extends JpaRepository<StoreEntity, String>{

	List<StoreEntity> findByOwnerOrganizationAndStatus(String orgId, String string, Pageable pageable);

	ProductEntity saveAndFlush(ProductEntity product);

	StoreEntity findByOwnerOrganization(String orgId);

	List<StoreEntity> findByStatus(String string, Pageable pag);

	List<StoreEntity> findByOwnerOrganizationAndStatus(String orgId, String string);
	
	int countByOwnerOrganizationAndStatus(String orgId, String string);

	List<StoreEntity> findByStatus(String string);

	int countByOwnerOrganization(String id);



}
